Method for distributed RDSMS

ABSTRACT

Methods for processing streaming data records are provided that include facilities for defining and naming multiple input and output data streams using relational processing definitions and abstractions similar to those found in relational database management systems (RDBMS) and embodied as a set of communicating stream processing nodes. The result is a Distributed Data Stream Management System (DDSMS) which is also a kind of Relational Data Stream Management System (RDSMS). The former comprises a set of Relational Data Stream Management System (RDSMS) nodes, whereas the latter might contain only a single RDSMS node.

This application is a continuation of application Ser. No. 13/753,385filed on Jan. 29, 2013, now U.S. Pat. No. 8,805,891 issued on Aug. 12,2014, which is a divisional application of application Ser. No.13/290,886 filed on Nov. 7, 2011, now U.S. Pat. No. 8,412,733 issued onApr. 2, 2013; which is a divisional application of application Ser. No.12/333,230 filed on Dec. 11, 2008, now U.S. Pat. No. 8,078,609 issued onDec. 13, 2011; which is a divisional application of application Ser. No.11/313,053 filed on Dec. 20, 2005, now U.S. Pat. No. 7,480,660 issued onJan. 20, 2009; which is a continuation application of application Ser.No. 10/390,091 filed on Mar. 15, 2003, now U.S. Pat. No. 7,010,538issued on Mar. 7, 2006; which applications and patents are herebyincorporated herein, in their entireties, by reference thereto, and towhich applications we claim priority under 35 USC §120.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to the field of data management and dataprocessing and describes a method of integrating application or servicecomponents and sources and consumers of data records, normally over dataor computer networks. The sources of data might be softwareapplications, hardware devices, sensors, or data streaming into files ordatabases, or transaction records or transaction logs. The data mightrelate to a wide range of industries such as stock market data infinancial services, service health, status or usage records intelecommunications, or plant operating status in industrial automationto name just a few. In particular, the invention relates to ways andmeans of managing, viewing and processing streams of data recordsflowing between the elements making up information processing systems,and applications thereof. The concept of a relational data streammanagement system (RDSMS) is described and the invention is a specificmethod for performing data processing using a specific distributed RDSMSapproach.

2. Description of the Related Art

With the advent of the Internet, there are many new ways for designersof computer information systems to connect, integrate and manage thecomponents of the information systems and computer applications.

There are a number of university research projects (see web linkhttp://www-db.stanford.edu/sdt/) which are, in the main, focusing onextending databases to allow for stream processing, treating RDBMS(relational database management systems) relations as infinite tables.

The work so far published is focused on either extending relationaldatabases (or other databases) to add streams capabilities (such as theSTREAM project at Stanford University http://www-db.stanford.edu/stream/which is not distributed and does not support the manageability orplug-in capabilities described below), or to devise ways of improvingquery performance and scheduling and the theoretical resource managementchallenges (predicting how much processing can be performed within givenmemory and other computing resources). There are also some paperslooking (from a mainly theoretical perspective) at a fewmonitoring-style applications.

This invention differs from the existing published work in a number ofimportant ways. First, the focus here is on an invention, method ormeans for managing a distributed collection of relational streamprocessing nodes that work together as a single system to create acomplete Distributed Data Stream Management System (“DDSMS”). This DDSMSoperates as a single, manageable, extensible infrastructure, processingand managing multiple streams of records along with multiple views ofthose record streams including their routing across the network ofstream processor nodes. It differs from other systems described byproviding a novel combination of facilities, including an SQL interface(SQL is supported by most relational database systems today), andoperating as a single system managed and configured from a centralconfiguration server where the single system itself comprises adynamically extensible set of interoperating stream processing nodeseach of which supports a plug-in capability for dynamically extendingthe capabilities of the stream processing engines. Each node has notonly input and output interfaces to support streams, but also has acontrol and a configuration interface to support dynamic externalcontrol and management of nodes, and to allow nodes to control thebehavior of one another and interoperate with one another, with the goalof behaving and appearing like a seamlessly integrated single completesystem. The system manages multiple sources and destinations for thestreams, and covers specific business and technical applicationsthereof. Rather than concentrating on the design, method or means for aspecific relational stream processing node, this invention focuses onhow to design a whole DDSMS comprising a set of such or similar nodeswith specific capabilities that are configured and work together asseamless complete system. In comparison with systems such as Aurora (seeweb references link earlier), this approach differs in its treatment ofthe distributed nodes as a seamless single system with a centralconfiguration and management service, its support for a plug-inextensibility to allow specialization of the system for specificapplication domains, and its inclusion of control and configurationinterfaces for each processing node.

Finally, the invention includes a short list of applications of thisDDSMS which offer novel solutions to existing problems, and offercompelling business value and clear advantages over existing approachesand solutions.

SUMMARY OF THE INVENTION

A method and apparatus for a DDSMS (see earlier) is described. A DDSMcomprises a set of communicating data stream processing nodes. We alsodescribe a means for constructing stream processing nodes which arerelational in their processing and querying behavior (they conform tostandard relational processing logic and semantics as originallyinvented by Codd—see reference below), but which differs from some otherapproaches in that it does not include a persistent relational databaseelement. In other words, it is not an extension of a relationaldatabase, but is rather purely designed for relational streamprocessing. In this approach, any data that need to be stored in arelational database or processed from a relational database are streamedout of the DDSMS to an external database (or databases) or similarlystreamed into the DDSMS from external databases. In this way, a DDSMSarchitecture which interoperates with databases but which does notitself contain any database facilities for storing and managing tuplescan be created using sets of such nodes. The invention of the overallDDSMS here allows for either kinds of relational stream processingnodes—either the one included as part of this invention, or others thatare constructed as extensions to relational databases to support thenecessary relational streaming operations described below.

The method then describes various ways that the DDSMS can be used tosolve business or technical problems relevant to the real world. Theseare distinct and differ from those described in external publications.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1—A diagram showing an example of a deployment of a DDSMS, withStream Processing (SP) nodes, Central Configuration Store server (CCS)communicating with one another and with external computer applicationsby means of a computer data network. The cloud drawn represents thesingle, seamlessly integrated, complete management domain for the DDSMS.

FIG. 2—A diagram showing the abstract architecture of an individual SPnode made up of its component parts (subsystems). The four externalinterfaces to node are shown and labeled, along with internal andexternal data flows. The fat arrows indicate flows of data records,whereas the skinny arrows indicate exchanges of control data. If anobject overlaps and is on top of another object, the latter represents asubsystem of the former. Data paths between systems and their subsystemsare not shown and are implicitly assumed.

DETAILED DESCRIPTION A. System Overview

1. Terminology

The Relational data model is based on the mathematics of relations andis derived from the seminal work of E. F. Codd [“A Relational Model ofData for Large Shared Data Banks”, CACM 13. No. 6. June 1970]. So far,commercial embodiments of the relational data model have been realizedas Relational Data Base Management Systems (RDBMS) such as Oracle andothers. Academic work, led by the database research communityworld-wide, has recently focused on applications of the relational datamodel to streaming data records or tuples. These streams are modeled as(potentially) infinite data tables, often with timestamps on each row ofdata. A row corresponds to a record that arrives in real-time.

In the below, the term “tuple” and “record” can be used interchangeably.A tuple is a relational term for an ordered collection of fields. Ann-tuple has n fields. For example, a triple is the same as a 3-tuple,and has three fields. In the methods described in the claims of theinvention the terminology used is “records”. This is because records arewhat most real world information systems process. Such records arerepresented as tuples when processed using the method of the invention.This will become clearer as the method and means are described.

A Relational Data Stream Management System (RDSMS) is the similar to aRelational Data Base Management System (RDBMS), but processes streams ofdata records rather than tables of data records. Relational operationsare similarly applicable to streams just as they are when defined overtables (relation operations such selection, projection, joins, unionsetc). This means that relational queries and processing operations,which are mathematically well defined, can be logically extended to havesimilar simple yet powerful mathematical meaning when applied tostreams. Such relational stream operations have a declarative semantics,which offers key benefits in the world of data management. Thedeclarative nature of their semantics allows one to define relationalexpressions that can be used to derive a new stream of records from anexisting stream by describing what the properties are of the records ofthe derived stream, rather than by detailing exactly how to constructthe new stream from the old in terms of the specific processingoperations to be performed. In other words, the logical mathematicalrelationship between the new stream and the original stream isdescribed, instead of the sequence of record processing operations onemight perform in order to create the new stream from the old. Suchmathematical (logical) semantics allows the rewriting of a relationalexpression with another equivalent perhaps simplified relationalexpression, while guaranteeing that the expressions are semanticallyidentical. This is immensely useful in allowing for automatic queryoptimization, where a software optimizer can rewrite retrievalexpressions into others that are identical but more efficient wheninterpreted by stream processing software.

A single node RDSMS can be constructed as a superset of a conventionalRDBMS that processes potentially multiple input data streams andgenerates potentially multiple output data streams along with the usualrelational database tables. This describes the nature of the workperformed at Stanford University [Jennifer Widen et al.,http://dbpubs.standford.edu/pub/2002-41]. However, we describe here aninvention of a RDSMS that it is not an extension of a RDBMS, processesonly streaming data (it does not manage persistent tables) andadditionally interacts with other RDSMS nodes, which together constitutea single integrated relational stream processing system. The streamprocessing is performed in what we call a relational Stream Processing(SP) node. A single SP node and its Configuration Store (see later)together comprise a RDSMS. If there are multiple SP nodes interoperatingthen we have a different invention, which we call a Distributed DataStream Management System, which is the main focus of this invention.

The main invention we describe is such a Distributed Data StreamManagement System (DDSMS). A DDSMS comprises a set of relational SPnodes, and is managed as a single system to provide an infrastructuresolution for processing streaming data over a large scale computernetwork with multiple and potentially distinct sources of anddestinations for streaming data. The streams are routed across therelevant RDSMS nodes in order to perform the processing required, withpotentially multiple concurrent streams of data crisscrossing thenetwork of SP nodes. The DDSMS is relational in terms of its dataprocessing, and its data can be viewed as flows of relational tuples.Tuples may contain fields which normally contain the same kinds of datatypes commonly found in a database (such as integers, floats, dates etc)and which might also be variable length or variable format types such ascharacter strings, bit strings or other binary content (such as audio,video, or pictures, or other digitized data).

2. Comparison of DDSMS Model with RDBMS and RDSMS Models

Whereas an RDBMS (relational database management system) and the newlyemerging RDSMS each are usually single node systems (there is a serverthat processes a stream of queries or transactions and generates astream of results), a DDSMS comprises a set of distributed SP nodes.These nodes interoperate in order to behave as a complete seamlesssystem that achieves the data stream processing specified in itsrelational operations. Whereas creating Distributed DBMS entailsovercoming the major technical challenges of synchronizing multipledatabases over potentially large geographically separated nodes (and sonever really have been successful in the marketplace), DDSMS arerelatively straightforward to construct and work elegantly andefficiently. They work well because there is no shared global state tosynchronize, and all the relational operations are side-effect free(i.e. truly declarative in nature). Relational operators operate onstreams as inputs, leave those streams unaltered (to flow to otherpotential consumers), and then generate instead new streams as outputswhich can in turn flow to other SP nodes. The specific techniques andarchitecture of the invention are described below.

3. Relational Data Streams

First let us visualize a relation as a table of rows comprising thetuples of that relation, just as is found in a RDBMS like Oracle. Therelational operators of Projection (selecting a columns from a table tocreate another table holding only those columns), Selection (retrievingrows that match certain criteria), Joining (where two tables are mergedby matching on a common attribute that is defined as a given column),Union (merging two tables by set-theoretic multiplication of the tuplecombinations) and other relational operations can all be readilyre-interpreted to apply to record streams resulting in the creation of anew record stream. The records in the streams correspond to the tuplesin a relation. Projection and Selection have a natural and obviousmeaning when applied to streams. Projection filters out only the fieldsspecified in the Projection specification and Selection filters out onlythe tuples that satisfy the Selection specification. Joins and Unionalso have an obvious interpretation, but we first need to add a timefield. The notion of a time window is then introduced which is appliedto any relational operations. For example, a Join operation might bedefined over a time window of five minutes. The meaning is that thestreams are joined only for matches of tuples made over the given timewindow. Such time windows can be specified to be Rolling or Paged. Theformer means that when an operation is applied over a rolling timewindow of say n minutes, only records whose time field lies within thelast n minutes of the reference time of processing are considered. Hencea single tuple might participate in multiple successive operations,until it is too old to qualify for processing in what becomes the newcurrent processing time window. For example, operations might be totalsof tuples over the last 5 minutes. You can visualize a time windowsliding or rolling over a series of tuples. In comparison, the pagedtime window pages over the tuples so that every tuple occurs in only asingle time window. When totals of tuples are calculated over 5 minutepaged windows, then you will get an aggregation of tuples with only asingle aggregated output tuple for each 5 minute interval. In Paged timewindows all time is chopped up into non overlapping time intervals and arecord will always belong to only a single window—different from rollingwindows where records belong to many different successive rollingwindows. When two streams are Joined, records are matched using the joinfield (a field that must exist in all records to be joined) for recordsthat lie within the same (specified) time window (based on thedesignated time-stamps of those records) and the result of each suchmatch is the creation of a new output stream record comprising a unionof the original fields of the constituent records. The nature of thematch varies according to the type of Join. For example, in an Equi-jointhe matching comparison is simply equality (and normally the matchingfield is included only once in the output record since the values areidentical). Other joins are also possible, such as “>”, “<”, sub-stringand many others. Such Join operations have practical application such asin matching buy-sell transactions for a given financial instrumentwithin a given time window given streams of buy requests and sellrequests. Another application is pulling together all of the pieces of acommercial transaction (integrating data from multiple sources such asmultiple service elements) and matching on a shared transaction id (orperhaps IP address) within a given time interval in order to create acomplete, integrated transaction record. Records falling outside thetime window are deemed to be either erroneous (to be processedexternally later) or else are from separate distinct transactions. Suchbehavior is important in real-time decision making applications in manyindustries including financial services and telecommunications. Anextended subset of SQL is the preferred language for representing thedefinition of streams, but graphical and other alternative ways ofrepresenting the definitions is permitted also in addition to SQL. Thesubset of SQL is given by the purely relational operations (allprocedural and database state manipulations are omitted). The extensionsare based on the incorporation of time windows. For example, a given SQLquery might specify a stream which comprises two input streams joined byIP Address over a paged 5 minute time window. This would look identicalto an SQL fragment for joining two input tables on the IP Addresscolumn, except that the time window value (5 minutes) and nature (pagedrather than scrolled) must be either implicitly (through some defaultvalue or configuration parameter) or explicitly (a Window statement orsome kind is added to extend the SQL language—hence an extended subsetof SQL, a subset because there is no meaningful interpretations for theprocedural and other database specific non-relational operations thatare also part of the SQL language).

4. System Management, Set-Up and Configuration

Streams in the DDSMS can have names, can have security accesspermissions (to allow particular users or applications or groups thereofto read the records of the stream) and are defined by a relationalexpression—a set of relational operators that operate on streams (asdefined in the previous section)—which in turn might operate on othernamed streams. Such relational stream expressions can be nested (as inSQL for relational queries for RDBMS). The relation expression can alsoinclude the names of programs (or plug-ins) that can also generatestreaming data (there has to be some way of generating the originalsources of streaming data). The system normally comes with a set ofuseful such programs and plug-ins to stream data from and to relationaldatabases, files, directories of files, and to encapsulate the outputsor inputs for other programs and applications (using operating systemstreaming primitives and redirecting inputs and outputs of suchprograms). The system is normally extensible, so that new plug-inprograms can be written to extend the system dynamically. Plug-ins alsocan perform computational processing of tuples, consuming and generatingtuple streams, thereby providing extensions to the usual relationaloperation vocabulary.

Streams also have a location that corresponds to the host system thatcreates the stream. Where a stream is replicated for load balancingpurposes, there might be multiple locations—but for each instance of thereplicated stream (the location of which is resolved at connecttime—i.e. when a user or application tries to read the stream) at anygiven time interval there will be stored somewhere in the DDSMS theidentity of the host machine responsible for generating the tuples ofthe stream. Some implementations of the DDSMS might expose the identityof the host machine of a stream. Other more sophisticatedimplementations may hide the source machine, and alter it dynamically,in order to perform optimization of the stream processing by relocatingthe stream to another more favorable machine (favorable in terms ofprocessing power, physical location, network bandwidth, utilization,disk or main memory capacity etc). Another example might entail breakingdown a single stream generating operation into separate sub-streams thatflow into one another, and then redistribute the work to differentmachines for each sub-stream. This might happen as the result of asophisticated automatic or dynamic optimization operation.

The DDSMS may support a method to perform Global Optimization to improvethe system performance by analyzing the relational stream definitionsand interdependencies, and by automatically rewriting the relationalexpressions (the stream definitions) with alternative, logicallyequivalent but more efficient definitions (in terms of execution). Suchoptimized relational definitions may include embedded directives thatare used in the execution of the stream expressions and also that areused in distributing the stream definitions to the relevant SP nodes.The rewriting approach is modeled after similar relational rewritingprocedures of relational databases, but reinterpreted in the streamingcontext, and with differing “cost functions” that evaluate the goodnessof the optimization progress and of the rewritten expression. Theoptimization goal is to improve the performance of the DDSMS by breakingup the relational stream operations or definitions (which make up thedefinition of the stream or view) into component pieces that areallocated to different SP nodes. In this way, for example, streams mightbe aggregated close to their source, rather than transmitting everyrecord across an expensive network only to then perform aggregation. Theorder and placement of the SP operations onto specific SP nodes can makea tremendous difference to the overall system performance. Theoptimization is performed in conjunction with a specified OptimizationPolicy and considers metrics available about the physical processingcharacteristics of the individual stream processors (SP nodes), and thecomputer infrastructure that is used to host and execute them(optionally including, without limitation, the speed and nature ofindividual computer systems such as system execution cost, clock speed,memory, number of processors, operating system, execution workload, alsoconsidering the bandwidth, speed or network connection costs, or networkreliability, and the size, speed and cost of storage whether that bemain memory or secondary storage). It also takes into considerationOptimization Constraints and parameters such as the maximum amount oftime to spend on optimization. The policies include, without limitation,differing optimization goals either for the complete system or forspecific streams such as maximizing total throughput, minimizinglatency, minimizing cost, minimizing transmission or retransmission ofdata, minimizing or maximizing loads on specific computer systems ornetwork links, or maximizing reliability. Such optimization optionallycan be performed dynamically, whereupon the DDSMS would transparently(to the outside world) relocate and restructure streams from one SP nodeto others as the execution of the transformed relational streamexpressions requires. The current status and location of the componentsof the stream are always held in the Central Configuration Store. Theoptimizer might perform factoring, where anonymous sub-streams arecreated and reused in the definition of other streams. Such sub-streamsallow for efficient reuse of DDSMS system wide resources and can reducetransmission, retransmission and avoid redundant stream processing too.

Streams implicitly have a defined structure in that the names, types andorder of the fields in the tuples of the stream will be defined by therelational expression that makes up the stream. Each tuple comprises aset of self-describing data items called fields, which are essentiallytriples. Each triple has a name, type and value such as<Family,String,“Black”>. The allowed type definitions should match theconventions of RDBMS and SQL (types are called domains in SQL) to allowfamiliarity and easy integration. The names of all fields (orattributes—another term for the same thing) are held in a centralconfiguration store, along with type definitions and stream definitions.

The Central Configuration Store server (CCS) is a server thatcommunicates with all nodes in the DDSMS. Each node comprises anindividual SP node, which performs the stream processing consistent withits stream definition as held in the CCS. Each node caches itsconfiguration data in case the central configuration store isunavailable. Any changes in the configuration store can be broadcast toall nodes, or else there are tools that allow a more controlled andselective dissemination of the changes made (to ensure that theresulting streams make commercial and consistent sense, as there mightbe dependencies within and outside of the system that need to be takeninto consideration before such changes are more widely made).

FIG. 1 (see drawings) illustrates a system including one embodiment ofthe invention. Applications running on external computer systemsgenerate and consume streams outside of the DDSMS, and each stream isdefined as a relational view (e.g. SQL views A through D)—that is, theinterpretation (or execution) of the relational expression that definesthe stream by the DDSMS and the Stream Processing (SP) nodes that itcomprises. The cloud drawing represents a computer data network linkingthe SP nodes, CCS and external computer systems. The arrows representdata flows. The benefit for external applications and data consumers isthe ability for each to define its own view on the streams, creating newstream definitions to meet its own specific needs on top of existingdefinitions. This offers a data abstraction, insulating the applicationsand users from changes to stream structures that might happen outside(e.g. changing external sources of data or format of data).

B. Architecture and Embodiment of DDSMS

FIG. 1 (see drawings) illustrates the conceptual architecture of theDDSMS. A DDSMS essentially comprises a network of communicating streamprocessing (SP) nodes along with a Central Configuration Store Server.One embodiment of such a system would comprise a program acting as alogical server for each of these entities. The code of each SP node isessentially similar, but each one performs the stream processing asdefined by the definitions of the streams that it is hosting, at anygiven time interval. Each stream might be transmitted as TCP-IPmessages, used to communicate between the servers. Alternatively UDP-IPor other protocols may be used. Streams are made up of records whichrepresent tuples, and each tuple comprises a set of fields whichthemselves are triples (to hold and describe the record's data). Oneembodiment of such a triple would be a variable length record itselfcomprising two fixed length fields (to store the field's name and typeidentifiers) and a variable length field (to hold the field's value).Each record in the stream might then consist of first a header thatindicates the number of fields in the record, followed by the variablelength fields themselves. A stream would then be made up of a sequenceof such tuples (a tuple is a collection of fields) sent in batches, thebatching determined by the arrival rate of the records. The batch sizeis determined to be a convenient (cost effective) unit of transmission,but if records are arriving slowly, the system might output batches ofeven a single record (in order to avoid delays in transmission). Thebatching policy is determined by a Local Optimizer, which optimizesaccording to configured optimization directives (for example, tomaximize throughput or to minimize latency of transmission). Such abatch would store the number of records in the batch followed by therecords, and the entire batch would be sent as a single networktransmission message. The stream itself is made up of such a sequence ofnetwork messages.

The architecture of one embodiment of a SP node is shown in FIG. 2 (seedrawings). Protocols other than TCP-IP may be used as the basis of batchtransportation. All input streams are directed to a SP node through itsInput Interface. All output streams are directed to external systems orother SP nodes through the Output Interface of the SP node generatingthe stream. The Output Interface optionally supports efficient means forbroadcasting or multicasting tuples over data networks (so as to avoidrepeated unnecessary point-to-point transmission of data where thenetwork supports a more efficient means) in such a way that the InputInterfaces of the target SP nodes will receive those tuples.

With the data structured into hatches this way, streams can be consumedand generated by the stream processing nodes tuple by tuple, and eachreceiving node can break down the tuple into self-describing data items,right down to the field level. The destination machines (for example,given by the IP address along with the TCP-IP port) for a stream at anygiven time interval can be determined from the current state of thecached configuration information. Any changes in configuration aredisseminated by the CCS according to a configurable specified policy,which includes broadcasting all changes immediately. The streamprocessing nodes normally have a thread or process that continuallylistens to a known TCP-IP port for any configuration or other controlinformation (such as starting and stopping) that might be sent (normallysent by the configuration server). This constitutes the ManagementInterface of the SP node.

The Central Configuration Store server might be embodied as a RDBMSapplication, using a relational database to store the configurationinformation such as the stream definitions and machine location, accessrights and the definition of all currently known field names and types.The central configuration server should normally be deployed in ahigh-availability configuration with a hot stand-by ready to take overupon any failures.

All of the servers (stream processing nodes or configuration servers)comprise logical servers and might be mapped onto one or many computerservers or systems. In other words, there is the concept of theseparation of logical servers from physical servers, to allow fordifferent and changing physical deployments. This will make no logicaldifference to the processing, but will definitely impact the hardwaredeployment architecture. Individual nodes and servers in someembodiments may be able to take advantage of multiple processorcomputers in order to increase through-put processing capacity.

As tuples enter the DDSMS, the system generates timestamps to label eachtuple with the time of entry. The timestamps need to be of sufficientgranularity to meet the needs of acceptable precision vis-à-vis the timewindow specification of the relational stream queries. Ideally, alltimestamps should be based on international standard time code (such asUTC—Coordinated Universal Time) to avoid complications of comparing datafrom different time zones. Alternatives are permissible. Queries mayspecify that alternative fields should serve as timestamps (which mightcorrespond instead to some time or key more pertinent to the specificapplication that is using the DDSMS). An example might be the recordcreation time at the record's original source, or perhaps the time ofthe original transaction etc).

Timestamps of output records are derived from the timestamps of inputrecords. They can be also explicitly defined (just as the other outputfields are explicitly defined as a part of relational stream definitionof the resulting output stream) or else a default policy can be setwhere the output timestamp is automatically created (often given as theearliest, latest or average of the input timestamps of the recordscontributing to the output record). In order to ensure timesynchronization across all SP nodes standard techniques should beemployed to synchronize machine clocks (such as using NTP and other wellproven mechanisms). When the timestamp is given by an existing field, itshould have numerical properties consistent with the windowing semanticsapplied to time, so that the window specification and queries aremeaningful. For example, a record key which is a monotonicallyincreasing quantity might make sense.

Some embodiments of the DDSMS will include reliable retransmission ofdata between nodes. Each node buffers up its output streaming tuples, incase there is a need to retransmit the data. The amount of buffering isa configurable item and depends upon the amount of space required tostore the tuples. The buffers optionally can be stored on disk to allowfor potentially large amounts of data. There is a handshaking protocolin such system embodiments (operated over the SP node's ControlInterface) that allows consuming nodes to indicate that they havereceived certain stream data tuples and have no further retransmissionneeds from the source (that is, to signal back to the sender that fromits own perspective, it will never need again to seek retransmission ofthe tuple; this implies that the records will have in turn been passedon to another consumer downstream that has indicated they have beenreceived and processed; this might in turn continue recursivelydownstream through other SP nodes). The handshaking is performed by oneSP node with another through their Control Interfaces. The ControlInterface might be physically implemented as part of the InputInterfaces or Output Interfaces, interleaved with the in the input oroutput transmission of record streams (interleaved somehow). These arephysical alternative embodiments of the same logical design. The ControlInterface is, however, a separate logical entity of the SP node.

The stream generator, when it has received such acknowledgments from allconsumers, will dispose of buffered tuples which are no longer needed.The SP node manages the output tuples in a Retransmission Buffer,holding all output tuples in that buffer until it is signaled that it issafe to now dispose of the tuples. Retransmission Buffers can beconfigured to be persistent, in which case the tuples are written to anoutput queue stored on disk or similar persistent media managed by thePersistent Store. The main memory space and disk space allocated for theRetransmission Buffers are configurable quantities and constrain themaximum number of tuples that can be stored before tuples have to bedropped. If a consumer fails, when it comes back to life, it transmits a“back alive” message to all stream suppliers, so that they canretransmit “unacknowledged” records—those that were not acknowledged asfully processed (in such a way as to be independent of a failure of theacknowledging node). One embodiment of such a recovery mechanism canalso use Recursive Recovery, where a node can seek in turnretransmission of tuples from its suppliers, reprocesses those tuplesand then streams the regenerated data out again in order to meetretransmission requests of external consuming nodes. This allows formore recovery scenarios and allows for reducing the buffering space ofintermediate SP nodes (as they might be able, if necessary, to takeadvantage of other upstream sources of tuple supply—nodes furtherupstream). When tuples are transmitted, there should be a way ofrecognizing the identity of the tuple, in order to avoid processingduplicate retransmitted records. Such a scheme might utilize thetimestamp of the record along with a unique serial number field,generated by the SP node. The SP node has to store sufficientinformation in order to be able to regenerate accurately any such recordidentification information, in such as way that consumers ofretransmitted records can detect and remove duplicates.

Embodiments of the system with such recovery mechanisms as recordretransmission and Recursive Recovery allow for systems with veryreliable data delivery, but which will take time to “catch up” whileretransmitting or reprocessing data. Such systems are suitable forbilling applications or applications where data loss must be minimize oreliminated (commercial transactions for example). Not all applicationswill need this capability. This capability complements other techniquessuch as hot standby processing nodes using high availability techniques.An embodiment might allow optional configuration of such recoverymechanisms, according to system throughput, reliability and solutioncost goals. Reliable transmission can be disabled in order to reducebuffering space and speed up throughput, in which retransmission oftuples might not be possible. Similarly, Recursive Recovery wouldnormally be an additional option to the more basic recovery mode ofsimple retransmission of tuples from the Retransmission Buffers.

Tuples arrive through the Input Interface of the SP node and arebuffered for efficiency to smooth out any fluctuations in arrival rate.If too many records arrive to be buffered safely, a message is sent backto the sender's Control Interface to signal it to suspend or slow downtransmission. Similarly signals can be sent to resume normaltransmission. The Retransmission Buffer of the sending SP nodes willhold tuples until the consumers are ready to process them.

The tuples flow next to the Stream Engine, which executes the relationaloperations of the streams that are configured for that SP node. Thetuples are presented to the relevant relational views and output tuplesresult. The Stream Engine manages a number of threads in order to takeadvantage of multi-processor computer systems, and will have differingimplementation with differing levels of optimization and scheduling ofstream operation execution. Indexing of stream definitions will beperformed for cases where there are large numbers of streams present.This ensures efficient distribution of tuples to relevant streamoperation executors or interpreters. The Local Optimizer allowsoptimization of the execution of stream definitions locally, allowingfor techniques like compilation into natively executing code. The StreamEngine is effectively a virtual machine implemented in software thatprocesses relational stream operations. The Thread Manager manages thepool of active threads and is effectively part of the Stream Engine.

The Stream Engine responds to control commands that arrive through theControl Interface, and permit external entities to start, stop and resetthe engine or specific streams, and other relevant control operationsrelated to retransmission, recovery and relocation of streams.

The stream definitions and other configuration information arrivethrough the Configuration Interface. The CCS can also send out specificplug-in processing execution modules to specific SP nodes to bedynamically loaded into the stream engines of those nodes. The loadingand unloading of such modules is handled by the Plug-in Manager. Suchplug-in modules represent executable code used to enhance the processingoperations of the Stream Engine. This is to allow for additional orupdated relational operations to be loaded without taking down the SPnodes concerned. It also allows for custom plug-ins to be written withan external plug-in development kit which allows system or applicationspecific operations to be performed. For example, all physicalcommunication with operating system files, streams, databases orapplications is performed with such plug-ins, and can include datainput, data output and data transformation operations. There areprimitives supplied for iterating and otherwise processing tuples withinthe given time window specification and to similarly access and processthe fields of those tuples. Plug-ins are managed through the CCS and aredynamically loaded, unloaded or replaced. A variety of programminglanguage interfaces is supported.

As the Stream Engine generates tuples of output streams, it passes thetuples one by one to the Retransmission Buffer manager which in turnpasses them on to the Output Interface. From there they are transmitted,multicast or broadcast to the consuming SP nodes according to theconfiguration information of the stream (as sent by the CCS).

C. Configuration and Management of Streams and Stream Processing Over aNetwork Using the DDSMS

Configuration is performed by interacting with the central configurationstore server. There are many embodiments possible (above an embodimentis described using relational databases). Streams can be defined as SQLexpressions or views. Stream definitions can written in a language thatis an extended subset of SQL, one which allows for the specification oftime windows (see above) but which does not support the non relationalSQL operations (of which there are now many in SQL including those forupdating databases, imperative programming etc.).

Alternatively, some embodiments may optionally offer a GUI basedconfiguration of a “nodes and arcs” form, where nodes correspond torelational stream operators and arcs correspond to stream flows. Such adataflow GUI is a natural way of representing the stream definitions.

Other embodiments are also allowed to co-exist using alternativerepresentations of streams and the stream processing operations, such asones based on predicate calculus (where streams are defined in terms oflogical predicates—Boolean expressions on records and their fields—thatmust hold to be true for each record that is treated as a valid recordof the stream, cf. the membership predicate of a set definition). Forexample, the programming language Prolog can be viewed as offering oneway of defining relations, and so in this context, could be readily usedas the basis of streams definitions (another way of stating this is thatpredicate calculus's Horn clauses can be used to define streams). {Forthe so-called “data logic” subset of Horn clauses where there are noembedded functions inside the predicates, only atoms and variables,there is an equivalence in expressive power with relational calculus(relational expressions with projection, join etc) for definingrelations. Such definitions can be readily translated from onerepresentation to the other and hence can be executed by the sameRelational Stream Engine of the SP nodes. Timestamps of output recordsare derived from the input records.}

Configuration of the fields is straightforward, and follows theprinciples adopted by many other data dictionaries or RDBMS. Fielddefinitions can be added, deleted or updated. The actual data of thefield instance flowing through actual live streams will be unaffected bysuch changes once such data have been created. This is intentional andreflects the fact that the fields are essentially self-describing (seecomments on fields' triples elsewhere). For configuration changes totake effect, they need to be communicated to the SP nodes through a setof provided commands.

All editing of configuration data (including operating parameters,stream definitions, field definitions, plug-in executable moduledefinitions including file name and nature of the executable such asexecutable format etc) is performed through a web-based user-interface,preferably with mechanisms to import and export configuration data inXML format in files in order to facilitate external management ofdifferent versions of the complete system configuration. This is usefulfor testing purposes and to allow reinstatement of earlierconfigurations following disasters. The CCS itself in some embodimentswill also support versioning of configurations whereby an archive ofdifferent complete configurations is maintained.

D. Applications of DDSMS

DDSMS have many potential applications. First they can be used toprocess streaming records from distributed service components orelements to aggregate down, filter, and otherwise construct completetransaction records for analysis or billing. They have applications inbilling for wireless and wire-line telephony, for data and otherservices.

Secondly, they can be used for data preprocessing and collection inorder to efficiently build databases and data warehouses, providing areal-time and much more flexible technology to replace today's primarilybatch oriented ETL tools (Extract Translate and Load) such as the ETLproducts of companies like Informatica.

Thirdly, they can be used to construct distributed peer-to-peerapplications as an alternative to Message Broker technology. Messagebrokers allow applications to communicate through so-called “Publish andSubscribe” interfaces, passing data record by record. They have thedisadvantage that they force people to program such services with whatis often called inverted logic (also known as event processing logic)where the receiver program has to be written with programming logic thathas to allow for the program to receive records of potentially any typeand at any time. This is in order to allow for the occurrence of anytype of event that might transpire at any time. State machines have tobe written to keep track of where the program is in the overalllifecycle of processing data. DDSMS offer a number of advantages overMessage Brokers. They allow multiple, differing views of data streams tobe defined (much more flexible and powerful than just the “publish andsubscribe” facility of Message Brokers, which itself is similar tosharing streams of a given name). The stream is, by nature, a sequenceof records, and thereby allows for conventional non-inverted logic,where applications are written as structured loops processing therecords as they arrive. There is no need to create a separate statemachine, and structured programming techniques readily apply. Suchprograms are not normally interrupted by the arrival of the next recordbefore the current record has been processed (unless the logicexplicitly requires parallel execution using so-called unblocked I/O andmultiple threads). DDSMS allow for powerful operations to define theseviews, with power and usefulness similar to RDBMS views. They allow fornon-inverted sequential processing logic to process streamsrecord-by-record. They allow for the benefits of efficiency andscalability that arise from designing a system around large volumes ofstreaming records. They allow the reliable transmission andretransmission of data, with a technology designed for coping withbursts in data arrival rates. Message Brokers typically have problemsscaling beyond a few thousands of records per second. DDSMS should beable to scale to hundreds of thousands of records per second. MessageBrokers typically drop records if they arrive in bursts. For example, atthe time of writing, the RendezVous message broker of Tibco, accordingthe FAQ on their current website (at the time of writing) will droprecords after 5000 have been queued up in the input buffer of aRendezVous server. This is not uncommon. Recursive Recovery describedabove offers an effective solution to this data loss problem whencoupled with the Control Interfaces of SP nodes.

DDSMS have strong applicability for processing input data from sensorssuch as location based devices, environment sensors, machinery statussensors, plant equipment sensors, and those of engines, vehicles, andinstruments. Such sources generate large volumes of data that need to bepreprocessed into more manageable streams for consumption in manyback-end applications such as monitoring, alarming, billing and analysisfor real-time decision making. It is a suitable basis for building SCADAand other industrial automation applications.

Other applications exist for network monitoring for all kinds ofnetworks: electronic data, mobile, wireless, electricity, water, otherutilities, highways, airways, railways and waterways—to be name but afew. The source of the data might be from SNMP MIBs (networkingequipment standard) of instruments or devices, from other similarstandardized protocols (e.g. CMIP), or held in proprietary structures ordelivered by proprietary management protocols. Preprocessed data can beused for a wide range of applications including fraud detection,surveillance, service usage billing (both pre and post paid) andanalysis applications.

E. Alternative Embodiments

There are many other potential embodiments of DDSMS, and severalvariations are described above.

F. Conclusion

The foregoing description of various embodiments of the invention hasbeen presented for purposes of illustration and description. It is notintended to limit the invention to the precise forms disclosed. Manymodifications and equivalent arrangements will be apparent.

What I claim is:
 1. A distributed data stream management systemcomprising: a network of communicating relational stream processingcomputer nodes distributed and configured for processing streams of datarecords received from at least one external source external of saidsystem, according to relational stream processing operations, without aneed to include a persistent relational database element to process saidstreams of data records, and outputting processed streams of datarecords to at least one external consumer external of said system; atleast two of said relational stream processing computer nodes eachcomprising: an input interface configured to receive input streams ofsaid streams of data records; and an output interface configured totransmit output streams of said streams of data records; a centralconfiguration server operably connectable to said relational streamprocessing computer nodes to communicate with said relational streamprocessing computer nodes; wherein said streams of data records receivedfrom at least one external source are broken up into component piecesand said component pieces are allocated to different ones of saidrelational stream processing computer nodes for said processing; whereinsaid at least two of said relational stream processing computer nodesaggregate a plurality of said output streams into a consumer outputstream of said streams of records and output said consumer output streamto at least one of said at least one external consumer; wherein saidcomponent pieces are managed by said relational stream processing nodes,respectively, in retransmission buffers, and said relational streamprocessing nodes dispose of said managed component pieces upon receiptof acknowledgement from a predefined subset of said at least oneexternal consumer that said consumer output stream has been successfullyreceived; and wherein said stream processing computer nodes operate in afunctionally equivalent manner as if a single stream processing computernode processed said streams of data records received from at least oneexternal source.
 2. The distributed data stream management system ofclaim 1, wherein said relational stream processing computer nodes eachinclude a configuration interface, and wherein said centralconfiguration server is connectable to said relational stream processingnodes through said configuration interfaces to deliver configurationinformation thereto.
 3. The distributed data stream management system ofclaim 2, wherein configurations of said relational stream processingcomputer nodes are dynamically updatable by delivery of saidconfiguration information from said central configuration server.
 4. Thedistributed data stream management system of claim 1, wherein saidrelational stream processing computer nodes each comprise a controlinterface configured to receive signals for controlling a speed oftransmission of said output streams of said streams of data records. 5.The distributed data stream management system of claim 1, wherein saidrelational stream processing computer nodes and said centralconfiguration server comprise logical servers that are mappable onto oneor more computer servers or systems.
 6. The distributed data streammanagement system of claim 1, wherein said at least one external sourcecomprises sensors selected from at least one of the members of the groupconsisting of: location based devices, environment sensors, machinerystatus sensors, plant equipment sensors, engine sensors, vehicle sensorsand instrument sensors.
 7. The distributed data stream management systemof claim 1, wherein said at least one external source comprisesdistributed service components and said streams of data records areprocessed by said system to aggregate down, filter and constructtransaction records for analysis or billing.
 8. The distributed datastream management system of claim 1, wherein said consumer output streamis configured for monitoring a network selected from at least one of thenetwork groups consisting of: electronic data, mobile, wireless,electricity, water, highway, airway, railway and waterway.
 9. Thedistributed data stream management system of claim 1, wherein saidconsumer output stream is configured for facilitating at least one of:fraud detection, surveillance, prepaid service usage billing, postpaidservice usage billing and billing analysis.
 10. A method of monitoringcomprising: providing a network of communicating relational streamprocessing computer nodes distributed and configured for processingstreams of data records; receiving said streams of data records from atleast one sensor; breaking up said streams of data records intocomponent substreams and allocating said component substreams todifferent ones of said relational stream processing computer nodes;processing said component substreams by said different ones of saidrelational stream processing computer nodes according to relationalstream processing operations; aggregating a plurality of output streams,outputted by said different ones of said relational stream processingcomputer nodes, resulting from said processing; and outputting anaggregated stream resulting from said aggregating to at least oneconsumer; wherein said component substreams are managed by saidrelational stream processing nodes, respectively, in retransmissionbuffers, and said relational stream processing nodes dispose of saidmanaged component substreams upon receipt of acknowledgement from apredefined subset of said at least one consumer that said aggregatedstream has been successfully received.
 11. The method of claim 10,wherein said at least one sensor is selected from at least one of themembers of the group consisting of: location based devices, environmentsensors, machinery status sensors, plant equipment sensors, enginesensors, vehicle sensors and instrument sensors.
 12. A method ofprocessing streams of data records, said method comprising: providing anetwork of communicating relational stream processing computer nodesdistributed and configured for processing streams of data records;receiving said streams of data records from at least one source;breaking up a set of relational stream processing operations to beperformed on said streams of data records into component pieces of saidset and allocating said component pieces to different ones of saidrelational stream processing computer nodes; processing said streams ofdata by said different ones of said relational stream processing nodesaccording to said component pieces of said set of relational streamprocessing operations assigned to each of said different ones of saidrelational stream processing nodes, respectively; aggregating aplurality of output streams, outputted by said different ones of saidrelational stream processing computer nodes, resulting from saidprocessing; and outputting an aggregated stream resulting from saidaggregating to at least one a consumer; wherein said component piecesare managed by said relational stream processing nodes, respectively, inretransmission buffers, and said relational stream processing nodesdispose of said managed component pieces upon receipt of acknowledgementfrom a predefined subset of said at least one consumer that saidaggregated stream has been successfully received.
 13. The method ofclaim 12, performed without a need to include a persistent relationaldatabase element to process said component pieces.
 14. The method ofclaim 12, wherein said breaking up said set of relational streamprocessing operations and said allocating are performed in a manner tooptimize processing performance.
 15. The method of claim 12, furthercomprising dynamically optimizing performance of the method, whereinsaid dynamically optimizing comprises at least one of restructuring saidcomponent pieces and reallocating said component pieces or restructuredcomponent pieces during said processing.
 16. The method of claim 12,wherein stream definitions for the relational stream processing computernodes are held in a central configuration store server; wherein thecentral configuration store server communicates with the relationalstream processing computer nodes; and wherein the relational streamprocessing computer nodes perform said processing according to thestream definitions applied thereto.
 17. The method of claim 16, furthercomprising the central configuration store server broadcasting changesto stream definitions to all relational stream processing computer nodesin the network.
 18. The method of claim 16, further comprising thecentral configuration store server transmitting changes to streamdefinitions to a select set of relational stream processing computernodes in the network, wherein said select set is less than all of therelational stream processing computer nodes in the network.
 19. Themethod of claim 12, wherein said aggregating a plurality of outputstreams comprises locally aggregating by performing multipleaggregations over multiple ones of said relational stream processingnodes each receiving multiple output streams, to reduce stream volume,and aggregating results of the local aggregations by another one of saidrelational stream processing nodes to provide one or more final,aggregated output streams.
 20. The method of claim 12, furthercomprising analyzing said processing said streams of data by saiddifferent ones of said relational stream processing nodes and, for onesof said relational stream processing nodes that yield no results,controlling said ones of said relational stream processing nodes thatyield no results to discontinue processing the streams of data or notgenerate an output stream.